<template>
  <div ref="lunbo" class="banner-com" :class="'stylesType_' + item.stylesType">
    <div v-show="showDelete" class="list-item-delete  ">
      <span class="pull_left">{{ item.text }}</span>
      <span class="pull_right" @click.stop="deleteCurItem(item, index)"
        >删除</span
      >
    </div>
    <el-carousel
      ref="allowBtn"
      :interval="5000"
      :arrow="item.stylesType == 0 ? 'always' : 'never'"
      height="180px"
    >
      <el-carousel-item
        v-for="(carouselItem, carouselIndex) in item.imgUrls"
        :key="carouselIndex"
      >
        <img :src="carouselItem.src" />
      </el-carousel-item>
    </el-carousel>
  </div>
</template>

<script>
export default {
  props: {
    item: {
      type: Object,
      default: () => {}
    },
    index: {
      type: Number,
      default: -1
    },
    showDelete: {
      type: Boolean,
      default: false
    }
  },
  methods: {
    deleteCurItem(e, i) {
      this.$emit("deleteCurItem", e, i);
    }
  }
};
</script>

<style lang="scss" scoped>
.banner-com {
  position: relative;
  img {
    width: 100%;
  }
}
</style>
<style>
.banner-com .el-carousel .el-carousel__container button {
  display: none;
}
</style>
